'use strict';
app.service('loginService',['$http','$q','utilService',function($http,$q,utilService){

    this.login = function($scope){
        var deferred = $q.defer();
        utilService.api({
            url:$scope.app.domain + 'shop/login',
            data:$scope.auth
        }).then(function(result){
            deferred.resolve(result);
        });
        return deferred.promise;
    }

}]);